package com.ly.heart.mapper;

import java.util.List;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.ly.heart.domain.WarehouseEntity;
import com.ly.heart.domain.dto.WarehouseDto;
import com.ly.heart.domain.vo.WarehouseVo;
import io.lettuce.core.dynamic.annotation.Param;

/**
 * 仓库Mapper接口
 *
 * @author cxl
 * @date 2024-05-14
 */
public interface WarehouseMapper extends BaseMapper<WarehouseEntity>
{
    /**
     * 查询仓库
     *
     * @param id 仓库主键
     * @return 仓库
     */
    public WarehouseEntity selectWarehouseEntityById(String id);

    /**
     * 查询仓库列表
     *
     * @param warehouseEntity 仓库
     * @return 仓库集合
     */
    List<WarehouseVo> selectWarehouseEntityList(WarehouseEntity warehouseEntity);

    Integer queryCount(WarehouseEntity warehouseEntity);

    IPage<WarehouseVo> selectWarehouseEntityListCopy(@Param("warehouse") WarehouseDto warehouse);

    IPage<WarehouseVo> selectNewWarehouseListCopy(@Param("warehouse") WarehouseDto warehouse);


    /**
     * 新增仓库
     *
     * @param warehouseEntity 仓库
     * @return 结果
     */
    public int insertWarehouseEntity(WarehouseEntity warehouseEntity);

    /**
     * 修改仓库
     *
     * @param warehouseEntity 仓库
     * @return 结果
     */
    public int updateWarehouseEntity(WarehouseEntity warehouseEntity);

    /**
     * 删除仓库
     *
     * @param id 仓库主键
     * @return 结果
     */
    public int deleteWarehouseEntityById(String id);

    /**
     * 批量删除仓库
     *
     * @param ids 需要删除的数据主键集合
     * @return 结果
     */
    public int deleteWarehouseEntityByIds(String[] ids);
}
